package app.model.vo 
{
	/**
	 * ...
	 * @author ria.go.vn
	 */
	public class TransactionVO extends Object 
	{
		/**
		 * Transactions Code client.
		 * Mã giao dịch thực hiện phía máy khách.
		 */
		public var id:Number;
		
		/**
		 * Data is sent from the client to the server
		 * Dữ liệu được gửi từ phía máy khách lên server
		 */
		public var data:* = null;
		
		/**
		 * Data is sent from the client to the server
		 */
		public var post:* = null;
		
		/**
		 * Data attachment lets get back
		 */
		public var attach:* = null;
		
		/**
		 * Each transaction code is generated automatically from control on the other, 
		 * each code does not have any relationship with server
		 * It only makes sense when we need to control transactions, 
		 * for example: 
	     * when we want to identify transactions {1,a:1}, {2,a:1}, {3,a:1}
		 * this process is controlled in an array and when looking through by id
		 */
		public function TransactionVO(_post:Object = null, _id:Number = NaN) {
			if (_post != null) post = _post;
			if(isNaN(_id)) 	id = new Date().getTime();
			else 			id = _id;
		}
	}
}